package com.redrose.rxandroiddemo.splash;

import android.view.View;

import androidx.lifecycle.MutableLiveData;
import androidx.lifecycle.ViewModel;

public class LoginViewModel extends ViewModel {
    private final MutableLiveData<String> loginLiveData;
    private final MutableLiveData<String> loginTextLiveData;

    public LoginViewModel() {
        this.loginLiveData = new MutableLiveData<>();
        this.loginTextLiveData = new MutableLiveData<>();
        loginTextLiveData.setValue("登录");
    }

    public MutableLiveData<String> getLoginLiveData() {
        return loginLiveData;
    }

    public void login() {
        loginLiveData.setValue("login");
    }

    public MutableLiveData<String> getTitleLiveData() {
        return loginTextLiveData;
    }
}
